package cn.stylefeng.guns.sys.modular.system.service;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.sys.modular.system.entity.BtyPerformanceMonthInformation;
import cn.stylefeng.guns.sys.modular.system.model.params.AttendAuditBtyAreaParam;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyPerformanceMonthInformationPageListParam;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyPerformanceMonthInformationParam;
import cn.stylefeng.guns.sys.modular.system.model.params.BtyPerformanceReceiveParam;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyPerformanceMonthInformationResult;
import cn.stylefeng.guns.sys.modular.system.model.result.BtyPerformanceSelectResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;
import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.http.ResponseEntity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author wjk
 * @since 2022-02-10
 */
public interface BtyPerformanceMonthInformationService extends IService<BtyPerformanceMonthInformation> {

    /**
     * 新增
     *
     * @author wjk
     * @Date 2022-02-10
     */
    void add(BtyPerformanceMonthInformationParam param);

    /**
     * 删除
     *
     * @author wjk
     * @Date 2022-02-10
     */
    void delete(BtyPerformanceMonthInformationParam param);

    /**
     * 更新
     *
     * @author wjk
     * @Date 2022-02-10
     */
    void update(BtyPerformanceMonthInformationParam param);

    /**
     * 查询单条数据，Specification模式
     *
     * @author wjk
     * @Date 2022-02-10
     */
    BtyPerformanceMonthInformationResult findBySpec(BtyPerformanceMonthInformationParam param);

    /**
     * 查询列表，Specification模式
     *
     * @author wjk
     * @Date 2022-02-10
     */
    List<BtyPerformanceMonthInformationResult> findListBySpec(BtyPerformanceMonthInformationParam param);

    /**
     * 查询分页数据，Specification模式
     *
     * @author wjk
     * @Date 2022-02-10
     */
    LayuiPageInfo findPageBySpec(BtyPerformanceMonthInformationParam param);

    Map<String,String> updateZb(String account, BtyPerformanceMonthInformationParam param);

    Map<String,String> delPersonzb(String account, BtyPerformanceMonthInformationParam param);

    /**
     * 根据 CheckId 获取 月度绩效详情信息;
     *
     * @author wjk
     * @Date 2022-02-14
     */
    List<BtyPerformanceMonthInformation> getBtyPerformanceMonthInformationListPageByCheckId(Long checkId);

    /**
     * 根据店名，查询上个月的绩效信息
     *
     * @author wjk
     * @Date 2022-02-14
     */
    List<BtyPerformanceMonthInformation> getBtyPerformanceMonthInformation(BtyPerformanceReceiveParam param);

    /**
     * 批量保存
     *
     * @author wjk
     * @Date 2022-02-14
     */
    int saveList(List<BtyPerformanceMonthInformation> list);

    /*
    查询所有的姓名
     */
    LayuiPageInfo findPageXm(BtyPerformanceMonthInformationParam btyPerformanceMonthInformationParam);

    /*
    查询所有的营运经理
     */
    LayuiPageInfo findPageYyjl(BtyPerformanceMonthInformationParam btyPerformanceMonthInformationParam);

    /*
    查询所有的督导
     */
    LayuiPageInfo findPageDd(AttendAuditBtyAreaParam param);

    /*
    查询所有的督导
     */
    List<BtyPerformanceSelectResult> findListDd(AttendAuditBtyAreaParam param);

    /*
    查询所有的店名
     */
    LayuiPageInfo findPageDm(AttendAuditBtyAreaParam param);

    /**
     * 根据妖码和人员的id 将人员调入本店
     *
     * @author wjk
     * @Date 2021-02-15
     */
    Map<String, String> addArchivesToPerformanceMonth(String account, BtyPerformanceMonthInformationParam param);

    /**
     *查询绩效明细
     **/
    /*
        查询绩效明细
        ws
         */
    LayuiPageInfo findPage(BtyPerformanceMonthInformationPageListParam param);
    /*
    根据妖码驳回上个月的绩效信息
    ws
     */
    Map<String, String> rejectMd(BtyPerformanceMonthInformationPageListParam param);

    /*
    统计门店数
    ws
     */
    Map<String, String> getShopCount(BtyPerformanceMonthInformationPageListParam param);

    /**
     * 根据妖码，月份，编码，查询，此人是否在本店
     *
     * @author wjk
     * @Date 2021-02-17
     */
    BtyPerformanceMonthInformation getBtyPerformanceMonthInformationByYaomaMonthBh(BtyPerformanceMonthInformation entityParam);

    /*
    导出
    ws
     */
    ResponseEntity<byte[]> exportList(HttpServletRequest request, HttpServletResponse response, BtyPerformanceMonthInformationPageListParam param);


    /**
     * 18 运营经理查询待审核店面详情列表，查询提交的绩效详情信息，包含最后一次的驳回原因
     *
     * @author wjk
     * @Date 2022-04-06
     */
    List<BtyPerformanceMonthInformationResult> getBtyPerformanceMonthInformationListDismissedByCheckId(Long btyPerformanceMonthCheckId);
}
